import React from 'react';
import { Button ,Breadcrumb} from 'antd';

import styles from './index.less';

function itemRender(route, params, routes, paths) {
    const last = routes.indexOf(route) === routes.length - 1;
    return last ? <span>{route.breadcrumbName}</span> : <Link to={paths.join('/')}>{route.breadcrumbName}</Link>;
}


export default ({ routes }) => {
  return (
      <Breadcrumb itemRender={itemRender} routes={routes}/>
  );
};
